import React, { useEffect, useState }from 'react'
import axios from 'axios'
export default function App() {
    const [list,Setlist]=useState([])
    useEffect(()=>{
        axios.get('/test.json').then(response =>{
            console.log(response.data.data.films)
            Setlist(response.data.data.films)
        })
    },[])
  return (
    <div>
        {
            list.map(item =><li key={item.filmId}>{item.name}</li>)
        }
    </div>
  )
}
